package com.fh.type.utils;


public class FullData {
    private Integer code;
    private String msg;
    private Object data;

//    处理成功时
    public static FullData success(Object data){
        FullData fullData = new FullData();
        fullData.setCode(200);
        fullData.setMsg("处理成功");
        fullData.setData(data);
        return fullData;
    }
//    处理失败时
    public static FullData error(Integer code, String msg){
        FullData fullData = new FullData();
        fullData.setCode(code);
        fullData.setMsg("处理异常:"+msg);
        fullData.setData(null);
        return fullData;

    }



    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
